package cn.longge.mapper;

import cn.longge.entity.Detail;
import org.apache.ibatis.annotations.Select;
import tk.mybatis.mapper.common.Mapper;

public interface DetailMapper extends Mapper<Detail> {

    @Select("select waste_type.name as waste_type_name,waste.`code` as waste_code,detail.component,detail.weight," +
            "detail.morphological,detail.packaging,waste_type.`code` as waste_type_code,detail.plate_number \n" +
            "from detail,waste,waste_type \n" +
            "where detail.del_flag = 0 \n" +
            "and detail.work_order_id = #{woId}\n" +
            "and detail.waste_id = waste.id \n" +
            "and detail.waste_type_id = waste_type.id")
    Detail selectDetail(int woId);
}